<?php

class admin_templateModel extends Model {

    public function listTemplates(){
        $this->LoadResource('files/dir', 'dobj');
        $templates = $this->dobj->getArquivos(TEMPLATES);
        foreach($templates as $name){
            $file = TEMPLATES . "$name/{$name}Template.php";
            if(file_exists($file)) $out[] = $name;
        }
        return $out;
    }

}

?>
